<!DOCTYPE html> 
<html>
  <head>
    <meta charset="utf-8">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <meta name="msapplication-tap-highlight" content="no" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">

    <!--CSS-->
    <link rel="stylesheet" href="API/css/themes/default/jquery.mobile.min.css" />
    <!--<link rel="stylesheet" href="API/js/DataTables/css/jquery.dataTables.min.css"/>--> 
    <link rel="stylesheet" href="API/css/mycss.css" />
    <link rel="stylesheet" href="css/mycss.css" />

    <!--JS-->
    <script type="text/javascript" src="include/config.js"></script>
    <script type="text/javascript" src="API/js/Jquery/jquery.min.js"></script>
    <script type="text/javascript" src="API/js/JqueryMobile/jquery.mobile.min.js"></script>
    <script type="text/javascript" src="API/js/functionsLib.js"></script>
    <script type="text/javascript" src="API_RH/js/fonctions.js"></script>
    <script type="text/javascript" src="js/fonctions.js"></script>

    <script type="text/javascript">
    checkMaintenance();
    checkAuthentification();
	
    ///////////////////
    //BLOCK VARIABLE GLOBAL
    ///////////////////
    var id_page = 23;
    var debray_listes_users = "0";
    var debray_figer = "0";

    var tabUser = new Array();
    var tabPhasesParActivite = new Array();
    var phaseObligatoire = false;
    var tabListes = new Array();
    var tabDomaine = new Array();
    var tabPhase = new Array();


    ///////////////////
    //BLOCK FONCTIONS EVENEMENTS
    ///////////////////
    $(document).on('pageinit',function() {
        try {
            // Init commmun
            init_commun();
        } catch (er) {
            log(0, "ERROR(init_home):" + er.message);
        }
    });

    $(document).on('pageshow',function() {
        try {
            show_commun();
        } catch (er) {
            log(0, "ERROR(show):" + er.message);
        }
    });
		
    //Fin chargement page
    function OnLoad() {
        try {
            // Init page
            init_item_listesUsers();
            init_item_figer();

            var tabListes = new Array();
            if(debray_listes_users == "1"){
                tabListes = getListesUsersByPropri(auth);
            }

            tabUser = getDataChoix();

            if(debray_figer == "1"){
                afficherFormFiger(tabUser,tabListes);
            }else{
                $( "#divFormFiger" ).text("");
            }

            afficherChoix(tabUser,tabListes);

            tabPhasesParActivite = getDataPhasesParActivite();
            tabDomaine = getDataDomaines();
            tabPhase = getDataPhases();

            semaineEnCours();
        } catch (er) {
            log(0, "ERROR(OnLoad):" + er.message);
        }
    }
		
    ///////////////////
    //BLOCK FONCTIONS METIER
    ///////////////////
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function init_item_listesUsers() {
        try {
            debray_listes_users = getParameter("debray_listes_users");
        } catch (er) {
            log(0, "ERROR(init_item_listesUsers):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function init_item_figer() {
        try {
            debray_figer = getParameter("debray_figer");
        } catch (er) {
            log(0, "ERROR(init_item_figer):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function afficherChoix(p_tabUser, p_tabListes) {
        try {
            var innerHtml = getHTMLChoix(p_tabUser, p_tabListes);
            $("#divChoix").html(innerHtml);
        } catch (er) {
            log(0, "ERROR(afficherChoix):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function afficherFormFiger(p_tabUser, p_tabListes) {
        try {
            var tabSemaine = new Array();
            tabSemaine = getDataSemaines();

            var innerHtml = getHTMLFiger(p_tabUser,tabSemaine,p_tabListes);
            $("#divFormFiger").html(innerHtml);
        } catch (er) {
            log(0, "ERROR(afficherFormFiger):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function semaineEnCours() {
        try {
            var currentTime = new Date();
            var annee = currentTime.getFullYear();
            var mois = pad2(currentTime.getMonth()+1);
            var jour = pad2(currentTime.getDate());
            var strDate = annee + '-' + mois + '-' + jour;
            afficherSuivi(strDate,auth);
        } catch (er) {
            log(0, "ERROR(semaineEnCours):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function afficherSuivi(p_date, p_auth, p_id) {
        try {
            var tab = getDataSuivi(p_date,p_auth);

            var innerHtml = getHTMLSuivi(tab,p_date,p_auth,tabDomaine,tabPhase,p_id);

            $("#divSuivi").html(innerHtml);
            
            $('#jour_5_haut').css("display","none");
            $('#jour_5_bas').css("display","none");
            $('#jour_6_haut').css("display","none");
            $('#jour_6_bas').css("display","none");
            $('#img_deplierreplier').attr('src', "API_RH/img/mini_deplier.png");
        } catch (er) {
            log(0, "ERROR(afficherAffectation):" + er.message);
        }
    }		

    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function semAvant(p_date,p_auth) {
        try {
            var dteDate = getObjDateFromStrUs(p_date);
            dteDate.setDate(dteDate.getDate() - 7);
            var annee = dteDate.getFullYear();
            var mois = pad2(dteDate.getMonth()+1);
            var jour = pad2(dteDate.getDate());
            var strDate = annee + '-' + mois + '-' + jour;

            afficherSuivi(strDate, p_auth);
        } catch (er) {
            log(0, "ERROR(semAvant):" + er.message);
        }
    }

    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function semApres(p_date,p_auth) {
        try {
            var dteDate = getObjDateFromStrUs(p_date);
            dteDate.setDate(dteDate.getDate() + 7);
            var annee = dteDate.getFullYear();
            var mois = pad2(dteDate.getMonth()+1);
            var jour = pad2(dteDate.getDate());
            var strDate = annee + '-' + mois + '-' + jour;

            afficherSuivi(strDate, p_auth);
        } catch (er) {
            log(0, "ERROR(semApres):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function retireTache(p_date,p_auth,p_id) {
        try {
            deleteSuiviActivite(p_date,p_auth,p_id);

            afficherSuivi(p_date, p_auth);
        } catch (er) {
            log(0, "ERROR(retireTache):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function editeTache(p_date,p_auth,p_id,p_value) {
        try {
            editeSuiviActivite(p_date,p_auth,p_id,p_value);

            afficherSuivi(p_date, p_auth, p_id);
        } catch (er) {
            log(0, "ERROR(editeTache):" + er.message);
        }
    }

    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function getColorOfColonn(p_valueCeJour,p_valueOuvre,p_valueCharge) {
        try {
            var strResponse = "";

            if( p_valueCeJour == "1"){
                strResponse = "#E5DE52";//jaune
            }else{
                if( parseInt(p_valueCharge) >= 10){
                    strResponse = "#81D07A";//vert
                }else{
                    if( p_valueOuvre == "1"){
                        strResponse = "#DFC091";//orange
                    }else{
                        strResponse = "#DADADA";//gris
                    }
                }
            }

            return strResponse;
        } catch (er) {
            log(0, "ERROR(getColorOfColonn):" + er.message);
        }
    }

    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function isObligatoire(p_tacheType) {
        try {
            var intResponse = 0;
            
            var sql = "SELECT `acti_obligatoire` FROM tab_suivihebdo_type_activite WHERE 1=1 AND id = '"+p_tacheType+"';";
            var returnSql = getSQL(sql);
            intResponse = parseInt(returnSql["data"]["resultat"]["data"][0]["acti_obligatoire"]);	

            return intResponse;
        } catch (er) {
            log(0, "ERROR(isObligatoire):" + er.message);
        }
    }

    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function ajoutTache(p_date,p_auth,p_tacheType,p_tacheActivite,p_tacheDuree,p_phase) {
        try {
            var strAlert = "Merci de saisir correctement : ";

            var strActi = "";
            if(isObligatoire(p_tacheType) == 1){
                if((p_tacheActivite == "Activit\351")||(p_tacheActivite == "")){
                    strActi = "Activit\351 ";
                }
            }

            var strDurr = "";
            if((p_tacheDuree == "Dur\351e")||(p_tacheDuree == "")){
                strDurr = "Dur\351e ";
            }

            var strDom = "";
            if(p_tacheType == ""){
                strDom = "Domaine ";
            }

            var strPhase = "";
            if((p_phase == "0")&&(phaseObligatoire==true)){
                strPhase = "Phase ";
            }

            strAlert += strDom + strActi + strDurr + strPhase;

            strAlert += ".";

            if((strDurr != "")||(strActi != "")||(strDom != "")||(strPhase != "")){
                    alert(strAlert);
            }else{
                insertSuiviActivite(p_date,p_auth,p_tacheType,p_tacheActivite,p_tacheDuree,p_phase);

                afficherSuivi(p_date, p_auth);
            }
        } catch (er) {
            log(0, "ERROR(ajoutTache):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function changeUser(p_code_user) {
        try {
            var myObj = document.getElementById("choix_user");

            if(myObj.options[0].value == ""){
                myObj.options[0] = null;
            }

            var currentTime = new Date();
            var annee = currentTime.getFullYear();
            var mois = pad2(currentTime.getMonth()+1);
            var jour = pad2(currentTime.getDate());
            var strDate = annee + '-' + mois + '-' + jour;
            afficherSuivi(strDate,p_code_user);
        } catch (er) {
            log(0, "ERROR(changeUser):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function changeListPhase(p_value_domaine,p_str_phase) {
        try {
            var myObj = document.getElementById(p_str_phase);

            myObj.length = 0;

            myObj.options[myObj.options.length] = new Option("Phase", "0");

            var nbElem = 0;

            for (var indice in tabPhasesParActivite) {
                if((tabPhasesParActivite[indice]["id_domaine"] == p_value_domaine)&&(tabPhasesParActivite[indice]["id_phase"] != "0")){
                    myObj.options[myObj.options.length] = new Option(tabPhasesParActivite[indice]["desc_phase"], tabPhasesParActivite[indice]["id_phase"]);
                    nbElem ++;
                }
            }

            if(nbElem > 0){
                myObj.disabled = false;
                phaseObligatoire = true;
            }else{
                myObj.disabled = true;
                phaseObligatoire = false;
            }
        } catch (er) {
            log(0, "ERROR(changeListPhase):" + er.message);
        }
    }
			
    ///////////////////
    //BLOCK FONCTIONS AFFICHAGE
    ///////////////////
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function DeplierReplier() {
        try {
            if($('#jour_5_haut').css("display") == "none"){
                $('#jour_5_haut').css("display","table-cell");
                $('#jour_5_bas').css("display","table-cell");
                $('#jour_6_haut').css("display","table-cell");
                $('#jour_6_bas').css("display","table-cell");
                $('#img_deplierreplier').attr('src', "API_RH/img/mini_replier.png");
            }else{
                $('#jour_5_haut').css("display","none");
                $('#jour_5_bas').css("display","none");
                $('#jour_6_haut').css("display","none");
                $('#jour_6_bas').css("display","none");
                $('#img_deplierreplier').attr('src', "API_RH/img/mini_deplier.png");
            }
        } catch (er) {
            log(0, "ERROR(DeplierReplier):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function figer(p_innerHTML) {
        try {
            var myObj_lien_figer = document.getElementById("id_lien_figer");
            var myObj_lien_defiger = document.getElementById("id_lien_defiger");
            var myObj_choix_figer_user = document.getElementById("choix_figer_user");
            var myObj_choix_semaine = document.getElementById("choix_semaine");	
            var tabDate = myObj_choix_semaine.value.split(";");

            var sql = "SELECT `date` FROM `affectation` WHERE 1=1 AND DATE between '"+tabDate[0]+"' and '"+tabDate[1]+"';";
            var returnSql = getSQL(sql);

            if((myObj_choix_figer_user.value != "ALL")&&(myObj_choix_figer_user.value != "")){
                if(p_innerHTML == "D\351figer"){
                    deleteJourFigerUser(myObj_choix_figer_user.value,tabDate[0],tabDate[1]);
                    myObj_lien_figer.innerHTML = "Figer";
                }else{
                    for (var indice in returnSql["data"]["resultat"]["data"]) {
                        insertJourFigerUser(myObj_choix_figer_user.value,returnSql["data"]["resultat"]["data"][indice]["date"]);
                    }
                    myObj_lien_figer.innerHTML = "D\351figer";
                }
            }else{
                var listSelected = document.getElementById('choix_figer_user');
                for (var i = 2; i < listSelected.length; i++) 
                {
                    var user = listSelected.options[i].value;
                    if(p_innerHTML == "D\351figer"){
                        deleteJourFigerUser(user,tabDate[0],tabDate[1]);
                        myObj_lien_figer.innerHTML = "";
                        myObj_lien_defiger.innerHTML = "";
                        myObj_choix_figer_user.selectedIndex = 0;
                    }else{
                        for (var indice in returnSql["data"]["resultat"]["data"]) {
                            insertJourFigerUser(user,returnSql["data"]["resultat"]["data"][indice]["date"]);
                        }
                        myObj_lien_figer.innerHTML = "";
                        myObj_lien_defiger.innerHTML = "";
                        myObj_choix_figer_user.selectedIndex = 0;
                    }
                }
            }
        } catch (er) {
            log(0, "ERROR(figer):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function checkEntreeFiger() {
        try {
            var myObj_lien_figer = document.getElementById("id_lien_figer");
            var myObj_lien_defiger = document.getElementById("id_lien_defiger");
            var myObj_choix_figer_user = document.getElementById("choix_figer_user");
            var myObj_choix_semaine = document.getElementById("choix_semaine");	
            var tabDate = myObj_choix_semaine.value.split(";");

            if(myObj_choix_figer_user.value == ""){
                alert("Merci de choisir un utilisateur, ou tous.");
                myObj_lien_figer.innerHTML = "";
            }else{
                if(myObj_choix_figer_user.value == "ALL"){
                    var answer = confirm("Confirmer d'appliquer \340 tous les utilisateurs ?")
                    if (answer){
                        myObj_lien_figer.innerHTML = "Figer";
                        myObj_lien_defiger.innerHTML = "D\351figer";
                    }
                    else{
                        myObj_lien_figer.innerHTML = "";
                        myObj_lien_defiger.innerHTML = "";
                    }
                }else{
                    var retourCheckFiger = checkFiger(myObj_choix_figer_user.value,tabDate[0],tabDate[1]);
                    if(retourCheckFiger["data"]["resultat"]["number"] == "0"){
                        myObj_lien_figer.innerHTML = "Figer";
                    }else{
                        myObj_lien_figer.innerHTML = "D\351figer";
                    }
                }
            }
        } catch (er) {
            log(0, "ERROR(checkEntreeFiger):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function checkEntreeFigerListe() {
        try {
            var strListe = $('#choix_figer_liste').val();
            var tabFiltreUsers = getUsersInListe(strListe);

            var myObj = document.getElementById("choix_figer_user");

            myObj.length = 0;

            myObj.options[myObj.options.length] = new Option("Utilisateur", "");
            myObj.options[myObj.options.length] = new Option("Tous", "ALL");

            for (var indice in tabUser) {
                myObj.options[myObj.options.length] = new Option(tabUser[indice]["code_user"]+" "+tabUser[indice]["nom"], tabUser[indice]["prenom"]);
            }

            for (var indice in tabFiltreUsers) {
                if(tabFiltreUsers[indice]["selected"] == "0"){
                    $("#choix_figer_user option[value='"+tabFiltreUsers[indice]["code_user"]+"']").remove();
                }
            }
        } catch (er) {
            log(0, "ERROR(checkEntreeFigerListe):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function changeUserListe() {
        try {
            var strListe = $('#choix_user_liste').val();
            var tabFiltreUsers = getUsersInListe(strListe);

            var myObj = document.getElementById("choix_user");

            myObj.length = 0;

            myObj.options[myObj.options.length] = new Option("Utilisateur", "");

            for (var indice in tabUser) {
                myObj.options[myObj.options.length] = new Option(tabUser[indice]["code_user"]+" "+tabUser[indice]["nom"], tabUser[indice]["prenom"]);
            }

            for (var indice in tabFiltreUsers) {
                if(tabFiltreUsers[indice]["selected"] == "0"){
                    $("#choix_user option[value='"+tabFiltreUsers[indice]["code_user"]+"']").remove();
                }
            }
        } catch (er) {
            log(0, "ERROR(changeUserListe):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function getHTMLChoix(p_tabUser, p_tabListes) {
        try {
            var strRetour = "";

            strRetour += "<br>";
            strRetour += "Choix de l'utilisateur &agrave; administrer : ";
            if(p_tabListes.length > 0){
                strRetour += "<SELECT name=\"choix_user_liste\" id=\"choix_user_liste\" style=\"font-size:10px;width:150px;\" onChange=\"changeUserListe();\">";
                strRetour += "<OPTION VALUE=\"\">Mes listes</OPTION>";
                for (var indice in p_tabListes) {
                        strRetour += "<OPTION VALUE=\""+p_tabListes[indice]["id"]+"\">"+p_tabListes[indice]["titre"]+" ("+p_tabListes[indice]["nb"]+")</OPTION>";
                }
                strRetour += "</SELECT>";
            }
            strRetour += "<SELECT name=\"choix_user\" id=\"choix_user\" style=\"font-size:10px;width:100px;\" onchange=\"changeUser(this.value)\">";
            strRetour += "<OPTION VALUE=\"\">Utilisateur</OPTION>";
            for (var indice in p_tabUser) {
                strRetour += "<OPTION VALUE=\""+p_tabUser[indice]["code_user"]+"\">"+p_tabUser[indice]["nom"]+" "+p_tabUser[indice]["prenom"]+"</OPTION>";
            }
            strRetour += "</SELECT>";
            strRetour += "<br>";
            strRetour += "<br>";

            return strRetour;
        } catch (er) {
            log(0, "ERROR(getHTMLChoix):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function getHTMLFiger(p_tabUser, p_tabSemaine, p_tabListes) {
        try {
            var strRetour = "";

            strRetour += "<br>";
            strRetour += "Choix du suivi &agrave; figer : ";
            if(p_tabListes.length > 0){
                strRetour += "<SELECT name=\"choix_figer_liste\" id=\"choix_figer_liste\" style=\"font-size:10px;width:150px;\" onChange=\"checkEntreeFigerListe();\">";
                strRetour += "<OPTION VALUE=\"\">Mes listes</OPTION>";
                for (var indice in p_tabListes) {
                    strRetour += "<OPTION VALUE=\""+p_tabListes[indice]["id"]+"\">"+p_tabListes[indice]["titre"]+" ("+p_tabListes[indice]["nb"]+")</OPTION>";
                }
                strRetour += "</SELECT>";
            }
            strRetour += "<SELECT name=\"choix_figer_user\" id=\"choix_figer_user\" style=\"font-size:10px;width:150px;\" onChange=\"checkEntreeFiger();\">";
            strRetour += "<OPTION VALUE=\"\">Utilisateur</OPTION>";
            strRetour += "<OPTION VALUE=\"ALL\">Tous</OPTION>";
            for (var indice in p_tabUser) {
                strRetour += "<OPTION VALUE=\""+p_tabUser[indice]["code_user"]+"\">"+p_tabUser[indice]["nom"]+" "+p_tabUser[indice]["prenom"]+"</OPTION>";
            }
            strRetour += "</SELECT>";
            strRetour += "<SELECT name=\"choix_semaine\" id=\"choix_semaine\" style=\"font-size:10px;width:150px;\" onChange=\"checkEntreeFiger();\">";
            for (var indice in p_tabSemaine) {
                strRetour += "<OPTION VALUE=\""+p_tabSemaine[indice]["lundi_sql"]+";"+p_tabSemaine[indice]["dimanche_sql"]+"\">"+p_tabSemaine[indice]["lundi_fr"]+" - "+p_tabSemaine[indice]["dimanche_fr"]+"</OPTION>";
            }
            strRetour += "</SELECT>";
            strRetour += "&nbsp;&nbsp; <a href=\"javascript:;\" onClick=\"figer(this.innerHTML);\" id=\"id_lien_figer\"></a> &nbsp; <a href=\"javascript:;\" onClick=\"figer(this.innerHTML);\" id=\"id_lien_defiger\"></a> <br>";
            strRetour += "<br>";
            strRetour += "<br>";

            return strRetour;
        } catch (er) {
            log(0, "ERROR(getHTMLChoix):" + er.message);
        }
    }
		
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function getHTMLSuivi(p_tab,p_date,p_auth,p_tabDomaine,p_tabPhase,p_id_green) {
        try {
            var strRetour = "";

            strRetour += "<table cellpadding=\"0\" cellspacing=\"0\" border=1 style=\"background-color:white;text-shadow: none;\">";
            
            //ENTETE
            strRetour += "<tr>";
            
            //Fleche avant
            strRetour += "<td rowspan=\"2\" width =\"25px\" style=\"text-align:center;\">";
            strRetour += "<a href=\"javascript:;\" onClick=\"semAvant('"+p_date+"','"+p_auth+"');\"><img border=0 src=\"API_RH/img/avant.png\" /></a>";
            strRetour += "</td>";
            
            //parcours les jours de lundi à vendredi
            for (var i = 0; i < 5; i++) 
            { 
                strRetour += "<td BGCOLOR=\""+getColorOfColonn(p_tab[i]["cejour"],p_tab[i]["ouvre"],p_tab[i]["total"])+"\" style=\"width: 210px;font-size:14px;\" id=\"jour_"+i+"_haut\">";
                var retourCheckFiger = checkFiger(p_auth,p_tab[i]["date"],p_tab[i]["date"]);
                var strFiger = "";
                if(retourCheckFiger["data"]["resultat"]["number"] != "0"){
                    strFiger = "<img style=\"vertical-align:text-bottom;\" border=0 src=\"API_RH/img/mini_figer.png\" />";
                }
                strRetour += "&nbsp;<b>"+getJour(p_tab[i]["jour"])+" "+getStrDateFrFromUs(p_tab[i]["date"])+" : "+p_tab[i]["total"]+"/10&nbsp;"+strFiger+"</b>";
                strRetour += "</td>";
            }
            
            //Deplier / plier
            strRetour += "<td rowspan=\"2\" width =\"20px\" style=\"text-align:center;\">";
            strRetour += "<a href=\"javascript:;\" onClick=\"DeplierReplier();\"><img id=\"img_deplierreplier\" border=0 src=\"API_RH/img/mini_deplier.png\" /></a>";
            strRetour += "</td>";
            
            for (var i = 5; i < 7; i++) 
            { 
                strRetour += "<td BGCOLOR=\""+getColorOfColonn(p_tab[i]["cejour"],p_tab[i]["ouvre"],p_tab[i]["total"])+"\" style=\"width: 210px;font-size:14px;\" id=\"jour_"+i+"_haut\">";
                var retourCheckFiger = checkFiger(p_auth,p_tab[i]["date"],p_tab[i]["date"]);
                var strFiger = "";
                if(retourCheckFiger["data"]["resultat"]["number"] != "0"){
                    strFiger = "<img style=\"vertical-align:text-bottom;\" border=0 src=\"API_RH/img/mini_figer.png\" />";
                }
                strRetour += "&nbsp;<b>"+getJour(p_tab[i]["jour"])+" "+getStrDateFrFromUs(p_tab[i]["date"])+" : "+p_tab[i]["total"]+"/10&nbsp;"+strFiger+"</b>";
                strRetour += "</td>";
            }
            
            //Fleche aprés
            strRetour += "<td rowspan=\"2\" width =\"25px\" style=\"text-align:center;\">";
            strRetour += "<a href=\"javascript:;\" onClick=\"semApres('"+p_date+"','"+p_auth+"');\"><img border=0 src=\"API_RH/img/apres.png\" /></a>";
            strRetour += "</td>";
            strRetour += "</tr>";
            strRetour += "<tr>";
            
            //CORPS
            //parcours les jours de lundi à dimanche
            for (var i = 0; i < 7; i++) 
            {
                strRetour += "<td BGCOLOR=\""+getColorOfColonn(p_tab[i]["cejour"],p_tab[i]["ouvre"],p_tab[i]["total"])+"\"  style=\"text-align:center;vertical-align:top;\" id=\"jour_"+i+"_bas\">";
                
                //Formulaire new activite
                strRetour += "<table cellpadding=\"0\" cellspacing=\"0\" border=1>";
                strRetour += "<tr>";
                strRetour += "<td style=\"width: 75px;text-align:center;\">";
                strRetour += "<SELECT name=\"tacheType_'"+i+"'\" style=\"font-size:10px;width:60px;\" onchange=\"changeListPhase(this.value,'phase_'"+i+"'')\">";
                strRetour += "<OPTION VALUE=\"\">Domaine</OPTION>";
                for (var indiceDomaines in p_tabDomaine) {
                    strRetour += "<OPTION VALUE=\""+p_tabDomaine[indiceDomaines]["id"]+"\">"+p_tabDomaine[indiceDomaines]["description"]+"</OPTION>";
                }
                strRetour += "</SELECT>";
                strRetour += "</td>";
                strRetour += "<td style=\"width: 100px;text-align:center;\">";
                strRetour += "<INPUT type=text name=\"tacheActivite_'"+i+"'\" value=\"Activit&eacute;\" size=\"9\" style=\"font-size:10px;\">";
                strRetour += "</td>";
                strRetour += "<td style=\"width: 75px;text-align:center;\">";
                strRetour += "<SELECT name=\"phase_'"+i+"'\" id=\"phase_'"+i+"'\" style=\"font-size:10px;width:60px;\" disabled>";
                strRetour += "<OPTION VALUE=\"0\">Phase</OPTION>";
                strRetour += "</SELECT>";
                strRetour += "</td>";
                strRetour += "<td style=\"width: 30px;text-align:center;\">";
                strRetour += "<INPUT type=text name=\"tacheDuree_'"+i+"'\" value=\"Dur&eacute;e\" style=\"font-size:10px;width: 30px;\">";
                strRetour += "</td>";
                strRetour += "<td style=\"width: 15px;text-align:center;font-size:10px;\">";
                strRetour += " <a href=\"#\" onClick=\"ajoutTache('"+p_tab[i]["date"]+"','"+p_auth+"',document.forms.formSuivi.tacheType_'"+i+"'.value,document.forms.formSuivi.tacheActivite_'"+i+"'.value,document.forms.formSuivi.tacheDuree_'"+i+"'.value,document.forms.formSuivi.phase_'"+i+"'.value);\"><img border=0 src=\"API_RH/img/mini_plus.png\" /></a>";
                strRetour += "</td>";
                strRetour += "</tr>";
                strRetour += "</table>";

                strRetour += "<br>";
                
                //List des activités
                for (var indice in p_tab[i]["saisies"]){
                    strRetour += "<table style=\"width:100%;\" cellpadding=\"0\" cellspacing=\"0\" border=1>";
                    strRetour += "<tr>";

                    //Bt d'action supp
                    strRetour += "<td style=\"width: 15px;text-align:center;font-size:10px;\">";
                    strRetour += "<a href=\"#\" onClick=\"retireTache('"+p_tab[i]["date"]+"','"+p_auth+"','"+p_tab[i]["saisies"][indice]["id"]+"');\"><img border=0 src=\"API_RH/img/mini_moins.png\" /></a>";
                    strRetour += "</td>";

                    //Le domaine
                    strRetour += "<td style=\"width: 75px;text-align:center;font-size:10px;\">";
                    var idTypeActi = p_tab[i]["saisies"][indice]["type"];
                    for (var indiceDomaines in p_tabDomaine) {
                        if(p_tabDomaine[indiceDomaines]["id"] == idTypeActi){
                            var strDescriptionDomaine = p_tabDomaine[indiceDomaines]["description"];
                            break;
                        }
                    }
                    strRetour += strDescriptionDomaine;
                    strRetour += "</td>";
                    strRetour += "<td style=\"width: 100px;text-align:center;font-size:10px;\">";
                    strRetour += p_tab[i]["saisies"][indice]["commentaire"];
                    strRetour += "</td>";

                    //Phase
                    var idTypePhase = p_tab[i]["saisies"][indice]["phase"];
                    for (var indicePhases in p_tabPhase) {
                        if(p_tabPhase[indicePhases]["id"] == idTypePhase){
                            var strDescriptionPhase = p_tabPhase[indicePhases]["description"];
                            break;
                        }
                    }
                    if(strDescriptionPhase != "N/A"){
                        strRetour += "<td style=\"width: 75px;text-align:center;font-size:10px;\">" + strDescriptionPhase + "</td>";
                    }

                    //Duree
                    strRetour += "<td style=\"width: 30px;text-align:center;font-size:10px;\">";
                    if(p_id_green != parseInt(p_tab[i]["saisies"][indice]["id"])){
                        strRetour += "<INPUT type=text name=\"tacheDuree_"+p_tab[i]["saisies"][indice]["id"]+"\" value=\""+p_tab[i]["saisies"][indice]["charge"]+"\" style=\"font-size:10px;width: 30px;\">";
                    }else{
                        strRetour += "<INPUT type=text name=\"tacheDuree_"+p_tab[i]["saisies"][indice]["id"]+"\" value=\""+p_tab[i]["saisies"][indice]["charge"]+"\" style=\"font-size:10px;width: 30px;background-color:#66CC33;\">";
                    }
                    strRetour += "</td>";

                    //bt action sauv
                    strRetour += "<td style=\"width: 15px;text-align:center;font-size:10px;\">";
                    strRetour += "<a href=\"#\" onClick=\"editeTache('"+p_tab[i]["date"]+"','"+p_auth+"','"+p_tab[i]["saisies"][indice]["id"]+"',document.forms.formSuivi.tacheDuree_"+p_tab[i]["saisies"][indice]["id"]+".value);\"><img border=0 src=\"API_RH/img/mini_valid.png\" /></a>";
                    strRetour += "</td>";

                    strRetour += "</tr>";
                    strRetour += "</table>";
                }	
                strRetour += "</td>";
            }

            strRetour += "</tr>";
            strRetour += "</table>";

            return strRetour;
        } catch (er) {
            log(0, "ERROR(getHTML):" + er.message);
        }
    }
    
    ///////////////////
    //BLOCK FONCTIONS BD
    ///////////////////	
    /**
     * @name insertSuiviActivite
     * @desc Ajout d'une activité
     * @param {type} p_date
     * @param {type} p_auth
     * @param {type} p_id
     * @param {type} p_value
     */
    function insertSuiviActivite(p_date, p_auth, p_tacheType, p_tacheActivite, p_tacheDuree, p_phase) {
        try {
            var tabInput = { date : p_date, auth : p_auth, tacheType : p_tacheType, tacheActivite : p_tacheActivite, tacheDuree : p_tacheDuree, phase : p_phase  };
            var retour = callBD(domaine+"API_RH/phpsql/mysql_insertSuiviActivite.php", "POST", "json", tabInput);
        } catch (er) {
            log(0, "ERROR(insertSuiviActivite):" + er.message);
        } 
    }
		
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function deleteSuiviActivite(p_date,p_auth,p_id) {
        try {
            var tabInput = { date : p_date, auth : p_auth, id : p_id };
            var retour = callBD(domaine+"API_RH/phpsql/mysql_deleteSuiviActivite.php", "POST", "json", tabInput);
        } catch (er) {
            log(0, "ERROR(deleteSuiviActivite):" + er.message);
        }
    }
	
    /**
     * @name editeSuiviActivite
     * @desc Change la charge d'une activité
     * @param {type} p_code_user
     * @param {type} p_date
     * @returns {type}
     */
    function editeSuiviActivite(p_date, p_auth, p_id, p_value) {
        try {
            var tabInput = { date : p_date, auth : p_auth, id : p_id, value : p_value };
            var retour = callBD(domaine+"API_RH/phpsql/mysql_editeSuiviActivite.php", "POST", "json", tabInput);
        } catch (er) {
            log(0, "ERROR(editeSuiviActivite):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function checkFiger(p_code_user,p_date_begin,p_date_end) {
        try {
            var tabInput = { code_user : p_code_user, date_begin : p_date_begin, date_end : p_date_end };
            var retour = callBD(domaine+"API_RH/phpsql/mysql_getCheckFiger.php", "POST", "json", tabInput);

            return retour;
        }
        catch (er) {
            log(0, "ERROR(checkFiger):" + er.message);
        }
    }
	
    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function insertJourFigerUser(p_code_user,p_date) {
        try {
            var tabInput = { code_user : p_code_user, date : p_date };
            var retour = callBD(domaine+"API_RH/phpsql/mysql_insertJourFigerUser.php", "POST", "json", tabInput);
        } catch (er) {
            log(0, "ERROR(insertJourFigerUser):" + er.message);
        } 
    }
    
    /**
     * @name deleteJourFigerUser
     * @desc Retir le figer
     * @param {string} p_code_user
     * @param {string} p_date_begin
     * @param {string} p_date_end
     */
    function deleteJourFigerUser(p_code_user,p_date_begin,p_date_end) {
        try {
            var tabInput = { code_user : p_code_user, date_begin : p_date_begin, date_end : p_date_end };
            var retour = callBD(domaine+"API_RH/phpsql/mysql_deleteJourFigerUser.php", "POST", "json", tabInput);
        } catch (er) {
            log(0, "ERROR(deleteJourFigerUser):" + er.message);
        }
    }
    
    /**
     * @name getDataChoix
     * @desc List des utilisateurs
     * @return {Array}
     */
    function getDataChoix() {
         try {
            var retour = new Array();
            
            var tabInput = {  };
            var jsonRetour = callBD(domaine+"API_RH/phpsql/mysql_getChoix.php", "POST", "json", tabInput);

            if(jsonRetour["strErreur"] != ""){
                notification("Erreur de l'interface getDataChoix : "+retour["strErreur"]);
            }else{
                retour = jsonRetour["data"]["resultat"]["data"];
            }

            return retour;
        } catch (er) {
            log(0, "ERROR(getDataChoix):" + er.message);
        }
    }
	
    /**
     * @name getDataSemaines
     * @desc Données des semaines
     * @return {Array}
     */
    function getDataSemaines() {
        try {
            var retour = new Array();
            
            var tabInput = {  };
            var jsonRetour = callBD(domaine+"API_RH/phpsql/mysql_getSemaines.php", "POST", "json", tabInput);

            if(jsonRetour["strErreur"] != ""){
                notification("Erreur de l'interface getDataPhasesParActivite : "+jsonRetour["strErreur"]);
            }else{
                retour = jsonRetour["data"]["resultat"]["data"];
            }
            
            return retour;
        } catch (er) {
            log(0, "ERROR(getDataSemaines):" + er.message);
        }
    }

    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function getDataSuivi(p_date,p_auth) {
        try {
            var retour = new Array();
            
            var tabInput = { date : p_date, auth : p_auth };
            var jsonRetour = callBD(domaine+"API_RH/phpsql/mysql_getSuivi.php", "POST", "json", tabInput);

            if(jsonRetour["strErreur"] != ""){
                notification("Erreur de l'interface getDataPhasesParActivite : "+jsonRetour["strErreur"]);
            } else{
                retour = jsonRetour["data"];
            }
            
            return retour;
        } catch (er) {
            log(0, "ERROR(getDataSuivi):" + er.message);
        }
    }
    
    /**
     * @name getDataDomaines
     * @desc Charge les domaines
     * @return {Array}
     */
    function getDataDomaines() {
        try {
            var retour = new Array();
            
            var tabInput = {  };
            var jsonRetour = callBD(domaine+"API_RH/phpsql/mysql_getSuiviDomaines.php", "POST", "json", tabInput);

            if(jsonRetour["strErreur"] != ""){
                notification("Erreur de l'interface getDataDomaines : "+retour["strErreur"]);
            }else{
                retour = jsonRetour["data"]["resultat"]["data"];
            }
            
            return retour;
        } catch (er) {
            log(0, "ERROR(getDataDomaines):" + er.message);
        }
    }

    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function getDataPhases() {
        try {
            var retour = new Array();
            
            var tabInput = {  };
            var jsonRetour = callBD(domaine+"API_RH/phpsql/mysql_getSuiviPhases.php", "POST", "json", tabInput);

            if(jsonRetour["strErreur"] != ""){
                notification("Erreur de l'interface getDataPhases : "+jsonRetour["strErreur"]);
            }else{
                retour = jsonRetour["data"]["resultat"]["data"];
            }
            
            return retour;
        } catch (er) {
            log(0, "ERROR(getDataPhases):" + er.message);
        }
    }

    /**
     * @name chargerExemple
     * @desc Hello
     * @param {type} nom
     * @return {type}
     */
    function getDataPhasesParActivite() {
        try {
            var retour = new Array();
            
            var tabInput = {  };
            var jsonRetour = callBD(domaine+"API_RH/phpsql/mysql_getPhasesParActivite.php", "POST", "json", tabInput);

            if(jsonRetour["strErreur"] != ""){
                notification("Erreur de l'interface getDataPhasesParActivite : "+jsonRetour["strErreur"]);
            }else{
                retour = jsonRetour["data"]["resultat"]["data"];
            }
            
            return retour;
        } catch (er) {
            log(0, "ERROR(getDataPhasesParActivite):" + er.message);
        }
    }
    </script>

</head>
<body onload="OnLoad();">
    
    <!-- page -->
    <div data-role="page" data-title="Titre">

        <!-- /panel -->
        <div data-role="panel" id="mypanel" data-display="overlay" data-position="left">

        </div>
        <!-- /panel -->

        <!-- header -->
        <div data-role="header" data-position="fixed">
            <a href="#mypanel" data-role="button" data-icon="home" data-iconpos="notext">home</a>
            <h1 id="id_titre">titre</h1>
            <a href="javascript:window.location = ('./page_contact.html?mili='+getMilise());" data-role="button" data-icon="info" data-iconpos="notext">Contact</a>
        </div>
        <!-- /header -->

        <!-- content -->
        <div data-role="content" id="main_content">

            <div data-role="collapsible" data-collapsed="false" data-mini="true">
                <h4>Supervision</h4>

                <center>

                <FORM method="post" id="formFiger" action="#">
                    <div id="divFormFiger"></div>
                </form>

                <FORM method="post" id="formChoix" action="#">
                    <div id="divChoix"></div>
                </form>

                <FORM method="post" id="formSuivi" action="#">
                    <a href="javascript:semaineEnCours();">Semaine en cours</a>
                    <div id="divSuivi"><IMG SRC="API/img/loading.gif" ALT="Chargement" TITLE="Chargement"></div>
                </form>

                </center>

            </div>

            <div data-role="collapsible" data-collapsed="false" data-mini="true">
                <h4>L&eacute;gende</h4>
                <center>
                    <table style="text-align: center;font-size:12px;"  cellpadding="0" cellspacing="0" border="0">
                        <tbody>
                            <tr>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;"><a href="#">Semaine en cours</a></td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Lien pour revenir sur la semaine courante</td>
                              <td style="width: 10px;">&nbsp;</td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Pour les OPS : OPS-YYYY-IT(OPS-2013-01)</td>
                            </tr>
                            <tr>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">
                                    <img border=0 src="API_RH/img/avant.png" />&nbsp;<img border=0 src="API_RH/img/apres.png" />
                              </td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Changer de semaine Pr&eacute;c&eacute;dente / Suivante</td>
                              <td>&nbsp;</td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Pour les crises : CRI-YYYY-ITE(CRI-2013-003)</td>
                            </tr>
                            <tr>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">
                              <table border="1" cellpadding="1" cellspacing="1">
                                    <tbody>
                                      <tr>
                                        <td style="text-align: center; width: 65px;">
                                        <select style="font-size: 10px;width:65px;" data-role="none">
                                        <option selected="selected" value="">Domaine</option>
                                        </select>
                                        </td>
                                        <td style="text-align: center; width: 100px;"><input style="font-size: 10px;" value="Activit&eacute;" size="11" data-role="none"> </td>
                                        <td style="text-align: center; width: 50px;"><input style="font-size: 10px;" value="Dur&eacute;e" size="3" data-role="none"> </td>
                                        <td style="text-align: center; width: 15px; font-size: 10px;"><a href="#"><img src="API_RH/img/mini_plus.png" border="0"></a> </td>
                                      </tr>
                                    </tbody>
                              </table>
                              </td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">
                                    Zone de saisie d'une nouvelle activit&eacute;<br>
                                    - Domaine : La typologie de l'activit&eacute;<br>
                                    - Activit&eacute; : Description de l'activit&eacute;<br>
                                    - Dur&eacute;ee : dur&eacute;e, type entier dixi&egrave;me de jour (ex : 2)<br>
                                    - L'image du plus : pour valider votre saisie
                              </td>
                              <td>&nbsp;</td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Pour les HBM : HBM-ITER(HBM-2445)</td>
                            </tr>
                            <tr>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">
                              <table border="1" cellpadding="1" cellspacing="1">
                                    <tbody>
                                      <tr>
                                        <td style="text-align: center; width: 15px; font-size: 10px;">
                                            <a href="#"><img src="API_RH/img/mini_moins.png" border="0"></a> </td>
                                        <td style="text-align: center; width: 100px; font-size: 10px;">
                                            Divers
                                        </td>
                                        <td style="text-align: center; width: 100px; font-size: 10px;">
                                            test1
                                        </td>
                                        <td style="text-align: center; width: 50px; font-size: 10px;">
                                            1 
                                        </td>
                                      </tr>
                                    </tbody>
                              </table>
                              </td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Une saisie d'activit&eacute;<br>
                            - L'image du mois : pour supprimer l'activit&eacute;</td>
                              <td>&nbsp;</td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Pour les PMA : PMA_YYYY_ITE(PMA_2012_019)</td>
                            </tr>
                            <tr>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;background-color: rgb(229, 222, 82);"></td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Jour courant</td>
                              <td>&nbsp;</td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Pour les Defect : DITE(D234)</td>
                            </tr>
                            <tr>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;background-color: rgb(129, 208, 122);"></td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Jour avec l'activit&eacute; compl&egrave;t&eacute;e</td>
                              <td>&nbsp;</td>
                              <td style="width: 275px;">&nbsp;</td>
                            </tr>
                            <tr>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;background-color: rgb(218, 218, 218);"></td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Jour non ouvr&eacute;</td>
                              <td>&nbsp;</td>
                              <td style="width: 275px;">&nbsp;</td>
                            </tr>
                            <tr>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;background-color: rgb(223, 192, 145);"></td>
                              <td style="background-color:white;width: 275px;border-style: solid solid solid solid; border-color:DarkGray;border-width: 1pt 1pt 1pt 1pt;">Jour avec l'activit&eacute; non compl&egrave;t&eacute;e</td>
                              <td>&nbsp;</td>
                              <td style="width: 275px;">&nbsp;</td>
                            </tr>
                        </tbody>
                    </table>
                </center>
            </div>
        </div>
        <!-- /content -->

        <!-- footer -->
        <div data-role="footer" data-position="fixed">
            <a data-role="button" data-icon="search" data-iconpos="notext" class="ui-btn-left" href="javascript:window.location = ('./page_faq.html?mili='+getMilise());">FAQ</a>
            <h1 id="id_affichageUser">User</h1>
            <a data-role="button" data-icon="delete" data-iconpos="notext" class="ui-btn-right" href="javascript:window.location = ('./page_sortie.html?mili='+getMilise());">Logout</a>
        </div>
        <!-- /footer -->

    </div>
    <!-- /page -->
</body>
</html>